

public class ArithmeticProgression
{
	private double first, dif;
	
	public ArithmeticProgression(float first, float dif)
	{
		this.first = first;
		this.dif = dif;
	}
	
	public double nthTerm(int n)
	{
		return first + (n -1) * dif;
	}
}
